﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MVC_Project.Model;
using MVC_Project.Dal.Systems;

namespace MVC_Project.Bll.Systems
{
    public class MenusBll : BaseBll<Menus>
    {
        public override void SetDal()
        {
            Dal = new MenusDal();
        }

        public List<Menus> GetMenusByRid(int rid) {

            var menus = Dal.Query();

            var mm = from m in menus
                     from a in m.Authority
                     where a.roleID == rid
                     select m;

            var list = mm.ToList();

            return list;
        }
    }
}
